file(GLOB SRC_LIST "*.cpp")
file(GLOB HEADERS "*.h")

if (BUILD_GM)
    string(REPLACE "SecureInitializer.cpp" "" SRC_LIST "${SRC_LIST}")
else()
    string(REPLACE "SecureInitializerGm.cpp" "" SRC_LIST "${SRC_LIST}")
endif()
if (EASYLOG)
set(REMOVE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/BoostLogInitializer.h)
list(REMOVE_ITEM HEADERS ${REMOVE_HEADERS})
set(REMOVE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/BoostLogInitializer.cpp)
list(REMOVE_ITEM SRC_LIST ${REMOVE_SOURCES})
else()
set(REMOVE_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/EasyLogInitializer.h)
list(REMOVE_ITEM HEADERS ${REMOVE_HEADERS})
set(REMOVE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/EasyLogInitializer.cpp)
list(REMOVE_ITEM SRC_LIST ${REMOVE_SOURCES})
endif()

add_library(initializer ${SRC_LIST} ${HEADERS})
target_include_directories(initializer SYSTEM BEFORE PUBLIC ${BOOST_INCLUDE_DIR})

target_link_libraries(initializer PUBLIC channelserver rpc ledger TBB devcore eventfilter)
# install(TARGETS initializer RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
